import { request } from '@gui-pkg/request';

enum Api {
  getDeptList = '/api/data/sys/dept/list',
  addDeptStion = '/api/data/sys/dept',
  editDeptStion = '/api/data/sys/dept/edit',
  delDeptStion = '/api/data/sys/dept/delete/',
  DeptTreeSelect = '/api/data/sys/dept/treeselect',
  DeptTreeList = '/api/data/sys/dept/listTree',
  DeptDetails = '/api/data/sys/dept/'
}
export const getDeptListTree = (params) => {
  return request.get({ url: Api.DeptTreeList, params });
};
// 获取组织列表
export const getDeptList = (params) => {
  return request.get({ url: Api.getDeptList, params });
};

// 添加组织
export const addDeptStion = (params) => {
  return request.post({ url: Api.addDeptStion, params });
};

// 编辑组织
export const editDeptStion = (params) => {
  return request.post({ url: Api.editDeptStion, params });
};

// 删除组织
export const deleteDeptStion = (params) => {
  return request.get({ url: Api.delDeptStion+params });
};

// 部门树形下拉
export const getDeptTreeSelect = (params) => {
  return request.get({ url: Api.DeptTreeSelect,params });
};

// 根据用户编号获取详细信息
export const getDeptDetails = (params) => {
  return request.get({ url: Api.DeptDetails+params });
};
